from django.urls import path
from .views import *

urlpatterns = [
    # 后台首页
    path('', IndexViews.index,name='myadmin_index'),

    # 后台登陆
    path('login',IndexViews.adminlogin,name='myadmin_login'),
    # 后台退出登陆
    path('logout',IndexViews.adminlogout,name='myadmin_logout'),
    # 验证码
    path('verifycode',IndexViews.verifycode,name='myadmin_verifycode'),

    # 会员管理
    path('user/index',UsersViews.userindex,name='myadmin_userindex'),
    path('user/add',UsersViews.useradd,name='myadmin_useradd'),
    path('user/delete',UsersViews.userdelete,name='myadmin_userdelete'),
    path('user/edit/<int:uid>/',UsersViews.useredit,name='myadmin_useredit'),

    # 分类管理
    path('classify/index',ClassifyViews.classifyindex,name='myadmin_classifyindex'),
    path('classify/add',ClassifyViews.classifyadd,name='myadmin_classifyadd'),
    path('classify/delete',ClassifyViews.classifydelete,name='myadmin_classifydelete'),
    path('classify/edit',ClassifyViews.classifyedit,name='myadmin_classifyedit'),

    # 图书商品管理
    path('book/index',BooksViews.bookindex,name='myadmin_bookindex'),
    path('book/add',BooksViews.bookadd,name='myadmin_bookadd'),
    path('book/delete',BooksViews.bookdelete,name='myadmin_bookdelete'),
    path('book/edit/<int:bid>',BooksViews.bookedit,name='myadmin_bookedit'),


]